<html>
<head><meta charset="utf-8"><title>very slow? · t-compiler/rust-analyzer · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/index.html">t-compiler/rust-analyzer</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/very.20slow.3F.html">very slow?</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="245430895"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/very%20slow%3F/near/245430895" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Manmeet Singh <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/very.20slow.3F.html#245430895">(Jul 09 2021 at 11:29)</a>:</h4>
<p>are these very slow? <span aria-label="thinking" class="emoji emoji-1f914" role="img" title="thinking">:thinking:</span>  </p>
<div class="codehilite"><pre><span></span><code> 1723 textDocument/semanticTokens/range   173ms
 1722 textDocument/codeAction             259ms
 1724 textDocument/semanticTokens/full    203ms
 1728 textDocument/semanticTokens/range   731ms
 1727 textDocument/codeAction             882ms
 1730 textDocument/semanticTokens/full    162ms
 1729 textDocument/completion             428ms
 1731 textDocument/completion             874ms
*1720 textDocument/codeAction             19ms
</code></pre></div>



<a name="245431205"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/very%20slow%3F/near/245431205" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/very.20slow.3F.html#245431205">(Jul 09 2021 at 11:32)</a>:</h4>
<p>Yeah, completion in particualr is worth looking into</p>



<a name="245431230"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/very%20slow%3F/near/245431230" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/very.20slow.3F.html#245431230">(Jul 09 2021 at 11:33)</a>:</h4>
<p>at the moment, I guess the reasonable threshold is 100ms</p>



<a name="245431247"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/very%20slow%3F/near/245431247" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Manmeet Singh <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/very.20slow.3F.html#245431247">(Jul 09 2021 at 11:33)</a>:</h4>
<p><span aria-label="face palm" class="emoji emoji-1f926" role="img" title="face palm">:face_palm:</span> I am using a month old rust analyzer</p>



<a name="245431539"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/very%20slow%3F/near/245431539" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Manmeet Singh <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/very.20slow.3F.html#245431539">(Jul 09 2021 at 11:37)</a>:</h4>
<p>(deleted)</p>



<a name="245431946"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/very%20slow%3F/near/245431946" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Manmeet Singh <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/very.20slow.3F.html#245431946">(Jul 09 2021 at 11:42)</a>:</h4>
<p>still similar on latest version</p>
<div class="codehilite"><pre><span></span><code> 2899 textDocument/codeAction             130ms
*2888 textDocument/codeAction             21ms
 2890 textDocument/semanticTokens/range   174ms
 2889 textDocument/codeAction             244ms
 2891 textDocument/semanticTokens/full    162ms
 2895 textDocument/semanticTokens/range   802ms
 2894 textDocument/codeAction             987ms
 2897 textDocument/semanticTokens/full    231ms
 2896 textDocument/completion             815ms
 2898 textDocument/completion             897ms
</code></pre></div>



<a name="245432727"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/very%20slow%3F/near/245432727" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/very.20slow.3F.html#245432727">(Jul 09 2021 at 11:51)</a>:</h4>
<p>Is that an open-source project?</p>



<a name="245433022"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/very%20slow%3F/near/245433022" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Manmeet Singh <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/very.20slow.3F.html#245433022">(Jul 09 2021 at 11:55)</a>:</h4>
<p>yes. typing <code>I</code> and requesting completion <a href="https://github.com/linebender/druid/blob/177f3d6c290b750529f3f857a67ff2d401889968/druid-shell/src/backend/gtk/window.rs#L678">here</a><br>
--<br>
Edit: use perma link</p>



<a name="245433220"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/very%20slow%3F/near/245433220" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Manmeet Singh <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/very.20slow.3F.html#245433220">(Jul 09 2021 at 11:57)</a>:</h4>
<p>I feel emacs is making it even slower, it feels like 5-10 seconds to me and emacs's ui is blocked <span aria-label="pensive" class="emoji emoji-1f614" role="img" title="pensive">:pensive:</span></p>



<a name="245433292"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/very%20slow%3F/near/245433292" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/very.20slow.3F.html#245433292">(Jul 09 2021 at 11:58)</a>:</h4>
<p>That's weird, I got a sea of unresolved names and had to clear the database, maybe there's some race on load</p>



<a name="245433372"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/very%20slow%3F/near/245433372" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/very.20slow.3F.html#245433372">(Jul 09 2021 at 11:59)</a>:</h4>
<p>And some panics :(</p>



<a name="245433382"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/very%20slow%3F/near/245433382" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/very.20slow.3F.html#245433382">(Jul 09 2021 at 11:59)</a>:</h4>
<p>might be the nondeterministic proc macro loading bug</p>



<a name="245433401"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/very%20slow%3F/near/245433401" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/very.20slow.3F.html#245433401">(Jul 09 2021 at 11:59)</a>:</h4>
<p>looks like we found a good code base to test on :)</p>



<a name="245433420"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/very%20slow%3F/near/245433420" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Manmeet Singh <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/very.20slow.3F.html#245433420">(Jul 09 2021 at 11:59)</a>:</h4>
<p>I never had panic/unresolved names on this code though</p>



<a name="245433472"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/very%20slow%3F/near/245433472" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/very.20slow.3F.html#245433472">(Jul 09 2021 at 12:00)</a>:</h4>
<p>It doesn't work for me at all because of the panics, though</p>



<a name="245433596"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/very%20slow%3F/near/245433596" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Florian Diebold <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/very.20slow.3F.html#245433596">(Jul 09 2021 at 12:01)</a>:</h4>
<p>you won't see the unresolved names in Emacs (unless you've enabled the semantic highlighting support, which I currently would not recommend)</p>



<a name="245433712"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/very%20slow%3F/near/245433712" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Manmeet Singh <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/very.20slow.3F.html#245433712">(Jul 09 2021 at 12:02)</a>:</h4>
<p>I have enabled semhl <span aria-label="sweat smile" class="emoji emoji-1f605" role="img" title="sweat smile">:sweat_smile:</span> . It is very eye candy, but also bit broken</p>



<a name="245433724"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/very%20slow%3F/near/245433724" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/very.20slow.3F.html#245433724">(Jul 09 2021 at 12:02)</a>:</h4>
<p><a href="/user_uploads/4715/Igygfp56HZBTP9PokSqJod9g/image.png">image.png</a></p>
<div class="message_inline_image"><a href="/user_uploads/4715/Igygfp56HZBTP9PokSqJod9g/image.png" title="image.png"><img src="/user_uploads/4715/Igygfp56HZBTP9PokSqJod9g/image.png"></a></div>



<a name="245433814"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/very%20slow%3F/near/245433814" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Florian Diebold <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/very.20slow.3F.html#245433814">(Jul 09 2021 at 12:03)</a>:</h4>
<p>emacs-lsp's semantic highlighting doesn't do partial updates yet as far as I know and is IMO too slow to use right now</p>



<a name="245433874"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/very%20slow%3F/near/245433874" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Florian Diebold <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/very.20slow.3F.html#245433874">(Jul 09 2021 at 12:04)</a>:</h4>
<p>so if you're having performance problems, disabling it might already help</p>



<a name="245433910"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/very%20slow%3F/near/245433910" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Manmeet Singh <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/very.20slow.3F.html#245433910">(Jul 09 2021 at 12:05)</a>:</h4>
<p>having _a lot_ of perf issues, lets disable it :)</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>